package com.fany.filesearcher;

import android.app.ProgressDialog;
import android.os.Handler;
import android.os.Message;
import com.fany.utils.CommonUtils;
import com.fany.utils.ContextUtils;

public class FileSearchHandler extends Handler
{
    public ProgressDialog progressDialog;
    public FileSearchThread fileSearchThread;

    public FileSearchHandler()
    {
    }

    public void interrupt()
    {
        fileSearchThread.interrupt();
    }

    @Override

    public void handleMessage(Message msg)
    {
        if (progressDialog.isShowing())
        {
            progressDialog.dismiss();
            CommonUtils.showToast(ContextUtils.getInstance().getApplicationContext(), String.format("当前缓存%d条数据", msg.what));
        }
    }
}